#ifndef BODYPART_H
#define BODYPART_H

#include <iostream>
#include "btBulletDynamicsCommon.h"
#include "BulletSoftBody/btSoftRigidDynamicsWorld.h"
#include "src/graphics/be_color.h"
#include "src/utils/displaylists.h"
#include <boost/shared_ptr.hpp>

// FIXME remove & test if static_cast returned 0
enum bodypartShape {
	BOX = 0,
	SPHERE,
	CYLINDER,
	TORUS,
	TRIANGLEMESH
};

enum bodypartType {
	RIGID = 0,
	SOFT,
	COLLISIONOBJECT
};

class Bodypart
{
	public:
		Bodypart( bodypartShape sh, bodypartType ty, const BeColor& clr, boost::shared_ptr<btDynamicsWorld> ownerWorld );
		virtual ~Bodypart();

		btCollisionShape* 	shape;
	
		bodypartShape		bpShape;
		bodypartType		bpType;

		BeColor			color;
// 		btScalar		position[16];
		btScalar		drawposition[16];

		virtual void		updatePosition() {};
// 		virtual void		copyPosition() {}; // for drawthread

		virtual void setFriction(const float friction) = 0;
		virtual void setRestitution(const float restitution) = 0;

	protected:
		boost::shared_ptr<btDynamicsWorld> 	m_ownerWorld;

	private:
};
#endif
